using Z = Mint<1000003>;
void solve()
{
  int n, W, H;
  cin >> n >> W >> H;

  W++;
  Matrix<Z> dp(W, W);
  rep(i, 1, W - 1) {
    if (i - 1 >= 0) {
      dp[i][i - 1] = H;
    }
  }
  rep(i, 0, W - 1) {
    dp[0][i] = 1;
  }
  dp = power<Matrix<Z>>(dp, n);
  Matrix<Z> f(W, 1);
  f[0][0] = 1;  
  dp *= f;

  Z ans;
  rep(i, 0, W - 1) {
    ans += dp[i][0];
  }
  cout << ans;
}